home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pctchnqs / 1991 / number2 / methods.act < prev    next >
Text File  |  1990-12-05  |  411b  |  16 lines

  1. now(class(System));
  2.  
  3. /* Returns the method which called the method in which
  4.    calledFrom is invoked. */
  5. Def calledFrom(self | bp)
  6. { if bp := stackLink(stackTop()) /* find current method */   
  7.   then ^function(new(Context, stackLink(bp)))
  8.   endif;
  9.   ^nil
  10. }
  11.  
  12. /* Returns the method in which currentMethod is invoked. */ 
  13. Def currentMethod(self)
  14. { ^function(new(Context, stackLink(stackTop())))
  15. }
  16.